<gm:page title="Sample - gm:subscribe" authenticate="true">
  <div align="center">
    <h1>Simple Discussion Board</h1>
    <gm:data id="allPosts" data="${app}/posts" />
    <gm:subscribe data="${allPosts}" label="Subscribe to this discussion board!" />
    <p></p>
    <div>
      <gm:list data="${allPosts}" selection="false" template="discussionTemplate" />
    </div>
    <div>
      <gm:item data="${allPosts}" template="newPostTemplate" create="true"/>
    </div>
  </div>

  <gm:template id="discussionTemplate">
    <table>
      <tr repeat="true">
        <td style="padding:5px;">
          <gm:textarea ref="atom:content" size="80" style="white-space:pre" />
        </td>
      </tr>
    </table>
  </gm:template>

  <gm:template id="newPostTemplate">
    <table style="margin-top:10px;">
      <tbody repeat="true">
        <tr>
          <td style="padding:5px;">
            Post: <gm:textarea ref="atom:content" size="80" style="white-space:pre;display:inline"/>
          </td>
        </tr>
        <tr>
          <td style="padding:5px;"><gm:editButtons text="true"/></td>
        </tr>
      </tbody>
    </table>
  </gm:template>

</gm:page>
	